if item 1 of line x of card field id 47 is not in card field id 48
then
beep
answer "Please check the spelling of line" && x &"."
exit mouseUp
end if
end repeat
repeat with x = 1 to 10
if the number of items in line x of card field id 47 <>3
then
beep
answer "Line " & x && "needs 3 items and 2 commas."
exit mouseUp
end if
end repeat
repeat with x = 1 to 12
if item 1 of line 1 of card field id 47 = item 1 of line x of card field id 48 then
put (item 2 of line x of card field id 48) + (item 2 of line 1 of card field id 47) + ((item 3 of line 1 of card field id 47)/60) into sunX
exit repeat
end if
end repeat
repeat with x = 1 to 12
if item 1 of line 2 of card field id 47 = item 1 of line x of card field id 48 then
put (item 2 of line x of card field id 48) + (item 2 of line 2 of card field id 47) + ((item 3 of line 2 of card field id 47)/60) into moonX
exit repeat
end if
end repeat
repeat with x = 1 to 12
if item 1 of line 3 of card field id 47 = item 1 of line x of card field id 48 then
put (item 2 of line x of card field id 48) + (item 2 of line 3 of card field id 47) + ((item 3 of line 3 of card field id 47)/60) into mercuryX
exit repeat
end if
end repeat
repeat with x = 1 to 12
if item 1 of line 4 of card field id 47 = item 1 of line x of card field id 48 then
put (item 2 of line x of card field id 48) + (item 2 of line 4 of card field id 47) + ((item 3 of line 4 of card field id 47)/60) into venusX
exit repeat
end if
end repeat
repeat with x = 1 to 12
if item 1 of line 5 of card field id 47 = item 1 of line x of card field id 48 then
put (item 2 of line x of card field id 48) + (item 2 of line 5 of card field id 47) + ((item 3 of line 5 of card field id 47)/60) into marsX
exit repeat
end if
end repeat
repeat with x = 1 to 12
if item 1 of line 6 of card field id 47 = item 1 of line x of card field id 48 then
put (item 2 of line x of card field id 48) + (item 2 of line 6 of card field id 47) + ((item 3 of line 6 of card field id 47)/60) into jupiterX
exit repeat
end if
end repeat
repeat with x = 1 to 12
if item 1 of line 7 of card field id 47 = item 1 of line x of card field id 48 then
put (item 2 of line x of card field id 48) + (item 2 of line 7 of card field id 47) + ((item 3 of line 7 of card field id 47)/60) into saturnX
exit repeat
end if
end repeat
repeat with x = 1 to 12
if item 1 of line 8 of card field id 47 = item 1 of line x of card field id 48 then
put (item 2 of line x of card field id 48) + (item 2 of line 8 of card field id 47) + ((item 3 of line 8 of card field id 47)/60) into uranusX
exit repeat
end if
end repeat
repeat with x = 1 to 12
if item 1 of line 9 of card field id 47 = item 1 of line x of card field id 48 then
put (item 2 of line x of card field id 48) + (item 2 of line 9 of card field id 47) + ((item 3 of line 9 of card field id 47)/60) into neptuneX
exit repeat
end if
end repeat
repeat with x = 1 to 12
if item 1 of line 10 of card field id 47 = item 1 of line x of card field id 48 then
put (item 2 of line x of card field id 48) + (item 2 of line 10 of card field id 47) + ((item 3 of line 10 of card field id 47)/60) into plutoX
exit repeat
end if
end repeat
if hour >= 12 then
put (minute + (60 * hour)) - (12 * 60) into interval
else put (12 * 60) - (minute + (60 * hour)) into interval
if abs(sun - sunX) > 300 then
if sun > sunx then put "true" into y
else put "false" into y
if y is "true" then subtract 360 from sun
else subtract 360 from sunX
end if
put sunX - sun into sundif
if abs(moon - moonX) > 300 then
if moon > moonx then put "true" into y
else put "false" into y
if y is "true" then subtract 360 from moon
else subtract 360 from moonX
end if
put moonX - moon into moondif
if abs(mercury - mercuryX) > 300 then
if mercury > mercuryx then put "true" into y
else put "false" into y
if y is "true" then subtract 360 from mercury
else subtract 360 from mercuryX
end if
put mercuryX - mercury into mercurydif
if abs(venus - venusX) > 300 then
if venus > venusx then put "true" into y
else put "false" into y
if y is "true" then subtract 360 from venus
else subtract 360 from venusX
end if
put venusX - venus into venusdif
if abs(mars - marsX) > 300 then
if mars > marsx then put "true" into y
else put "false" into y
if y is "true" then subtract 360 from mars
else subtract 360 from marsX
end if
put marsX - mars into marsdif
if abs(jupiter - jupiterX) > 300 then
if jupiter > jupiterx then put "true" into y
else put "false" into y
if y is "true" then subtract 360 from jupiter
else subtract 360 from jupiterX
end if
put jupiterX - jupiter into jupiterdif
if abs(saturn - saturnX) > 300 then
if saturn > saturnx then put "true" into y
else put "false" into y
if y is "true" then subtract 360 from saturn
else subtract 360 from saturnX
end if
put saturnX - saturn into saturndif
if abs(uranus - uranusX) > 300 then
if uranus > uranusx then put "true" into y
else put "false" into y
if y is "true" then subtract 360 from uranus
else subtract 360 from uranusX
end if
put uranusX - uranus into uranusdif
if abs(neptune - neptuneX) > 300 then
if neptune > neptunex then put "true" into y
else put "false" into y
if y is "true" then subtract 360 from neptune
else subtract 360 from neptuneX
end if
put neptuneX - neptune into neptunedif
if abs(pluto - plutoX) > 300 then
if pluto > plutox then put "true" into y
else put "false" into y
if y is "true" then subtract 360 from pluto
else subtract 360 from plutoX
end if
put plutoX - pluto into plutodif
put the value of (abs(interval)) div 60 & " h " && the value of (abs(interval)) mod 60 & " m" into line 1 of card field id 3 of card id 3295
put the value of (abs(60 * sundif)) div 60 & "°" && the value of (abs(60 * sundif)) mod 60 & "'" into line 2 of card field id 3 of card id 3295
put the value of (abs(60 * moondif)) div 60 & "°" && the value of (abs(60 * moondif)) mod 60 & "'" into line 3 of card field id 3 of card id 3295
put the value of (abs(60 * mercurydif)) div 60 & "°" && the value of (abs(60 * mercurydif)) mod 60 & "'" into line 4 of card field id 3 of card id 3295
put the value of (abs(60 * venusdif)) div 60 & "°" && the value of (abs(60 * venusdif)) mod 60 & "'" into line 5 of card field id 3 of card id 3295
put the value of (abs(60 * marsdif)) div 60 & "°" && the value of (abs(60 * marsdif)) mod 60 & "'" into line 6 of card field id 3 of card id 3295
put the value of (abs(60 * jupiterdif)) div 60 & "°" && the value of (abs(60 * jupiterdif)) mod 60 & "'" into line 7 of card field id 3 of card id 3295
put the value of (abs(60 * saturndif)) div 60 & "°" && the value of (abs(60 * saturndif)) mod 60 & "'" into line 8 of card field id 3 of card id 3295
put the value of (abs(60 * uranusdif)) div 60 & "°" && the value of (abs(60 * uranusdif)) mod 60 & "'" into line 9 of card field id 3 of card id 3295
put the value of (abs(60 * neptunedif)) div 60 & "°" && the value of (abs(60 * neptunedif)) mod 60 & "'" into line 10 of card field id 3 of card id 3295
put the value of (abs(60 * plutodif)) div 60 & "°" && the value of (abs(60 * plutodif)) mod 60 & "'" into line 11 of card field id 3 of card id 3295